Should we wrap jquery code $(document).ready(function(){ in external js also
Posted
by metal-gear-solid
on Stack Overflow
See other posts from Stack Overflow
or by metal-gear-solid
Published on 2010-04-27T14:06:19Z
Indexed on
2010/04/27
14:13 UTC
Read the original article
Hit count: 149
When we write inline javascript in then we keep code inside
$(document).ready(function(){
// Your code here
});
and if i want to paste
code // Your code here
in external .js file then should i keep code inside this
$(document).ready(function(){
// Your code here
});
or we can have without this
// Your code here
© Stack Overflow or respective owner